package com.youzhi.backend.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.youzhi.backend.dto.TreeNode;
import com.youzhi.backend.entity.Privilege;
import com.youzhi.backend.mapper.PrivilegeMapper;
import com.youzhi.backend.service.IMenuService;
import com.youzhi.backend.service.IPrivilegeService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 系统权限表 服务实现类
 * </p>
 *
 * @author xumeng
 * @since 2022-11-18
 */
@Service
public class PrivilegeServiceImpl extends ServiceImpl<PrivilegeMapper, Privilege> implements IPrivilegeService {


    @Override
    public List<Privilege> getByCodes(List<String> codes) {
        QueryWrapper queryWrapper = new QueryWrapper();
        queryWrapper.in("code", codes);
        return list(queryWrapper);
    }


}
